// 首页样式 - 微信小程序规范
.index-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #191f28;
  position: relative;
  
  &::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 175, 130, 0.05) 0%, rgba(0, 212, 170, 0.05) 100%);
    pointer-events: none;
    z-index: 0;
  }
}


// 内容区域 - 微信小程序规范
.content-area {
  min-height: calc(100vh - 200rpx);
  padding: 0;
  background: transparent;
  position: relative;
  z-index: 1;
}

/* 首页骨架屏 */
.skeleton-page {
  background: #f5f5f5;
  min-height: 100vh;
}

/* 头部骨架屏 */
.skeleton-header {
  height: 100rpx;
  background: white;
  padding: 20rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}

.skeleton-header-content {
  width: 100%;
  height: 60rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8rpx;
}

/* 轮播图骨架屏 */
.skeleton-banner {
  height: 300rpx;
  margin: 20rpx;
  border-radius: 16rpx;
  overflow: hidden;
}

.skeleton-banner-item {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

/* 主导航骨架屏 */
.skeleton-nav {
  display: flex;
  justify-content: space-around;
  padding: 20rpx;
  background: white;
  margin: 0 20rpx;
  border-radius: 16rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}

.skeleton-nav-item {
  width: 120rpx;
  height: 60rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8rpx;
}

/* 筛选标签骨架屏 */
.skeleton-filter-tags {
  background: white;
  padding: 20rpx;
  display: flex;
  gap: 16rpx;
  margin: 20rpx;
  border-radius: 16rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}

.skeleton-filter-tag {
  width: 80rpx;
  height: 50rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 25rpx;
}

/* 商品网格骨架屏 */
.skeleton-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20rpx;
  padding: 20rpx;
}

.skeleton-product-card {
  background: white;
  border-radius: 16rpx;
  overflow: hidden;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}

.skeleton-product-image {
  width: 100%;
  height: 200rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-product-info {
  padding: 20rpx;
}

.skeleton-product-title {
  width: 80%;
  height: 28rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4rpx;
  margin-bottom: 12rpx;
}

.skeleton-product-title-short {
  width: 60%;
  height: 28rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4rpx;
  margin-bottom: 16rpx;
}

.skeleton-product-price {
  width: 50%;
  height: 36rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4rpx;
  margin-bottom: 16rpx;
}

.skeleton-product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skeleton-product-footer::before {
  content: '';
  width: 60%;
  height: 24rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4rpx;
}

.skeleton-product-footer::after {
  content: '';
  width: 20%;
  height: 24rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4rpx;
}

/* 骨架屏动画 */
@keyframes skeleton-loading {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 页面进入动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30rpx);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30rpx);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30rpx);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 页面元素动画类 */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.scale-in {
  animation: scaleIn 0.5s ease-out;
}

// 骨架屏样式
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton-container {
  padding: 20rpx;
  
  .skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20rpx;
  }
}

.skeleton-card {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skeleton-image,
.skeleton-banner,
.skeleton-avatar,
.skeleton-product {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-banner {
  height: 200px;
  margin: 16px;
  border-radius: 12px;
}

.skeleton-image {
  height: 200px;
  margin-bottom: 12px;
}

.skeleton-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.skeleton-product {
  width: 120px;
  height: 80px;
  margin-right: 12px;
  flex-shrink: 0;
}

.skeleton-title,
.skeleton-name {
  height: 20px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-price {
  height: 16px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
  width: 60%;
}

.skeleton-text {
  height: 14px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 6px;
  width: 40%;
}

.skeleton-tag {
  height: 20px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
  margin-right: 8px;
  width: 60px;
  flex-shrink: 0;
}

.skeleton-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skeleton-tags {
  display: flex;
  gap: 8px;
}

.skeleton-products {
  display: flex;
  overflow-x: auto;
  margin-top: 12px;
  padding: 8px 0;
}

.skeleton-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.skeleton-info {
  flex: 1;
  margin-left: 12px;
}

/* 图片懒加载样式 */
.image-placeholder,
.avatar-placeholder,
.logo-placeholder,
.product-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  color: #999;
  font-size: 12px;
  border-radius: 8px;
}

.product-image-container {
  position: relative;
  width: 100%;
  height: 200rpx;
  border-radius: 8rpx;
  overflow: hidden;
  background-color: #f5f5f5;
}

.image-loading-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  color: #999;
  font-size: 24rpx;
  z-index: 1;
}

.product-image-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  color: #999;
  font-size: 12px;
  z-index: 2;
}

.product-image {
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.product-image.loaded {
  opacity: 1;
}

.avatar-container {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  color: #999;
  font-size: 12px;
  z-index: 2;
}

.avatar-container .avatar-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.doctor-avatar {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.doctor-avatar.loaded {
  opacity: 1;
}

.logo-container {
  position: relative;
  width: 96rpx;
  height: 96rpx;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  color: #999;
  font-size: 12px;
  z-index: 2;
}

.logo-container .logo-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hospital-logo {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hospital-logo.loaded {
  opacity: 1;
}

/* 加载更多按钮 */
.load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  margin: 16px 0;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.load-more-btn:hover {
  background-color: #f5f5f5;
  border-color: #d0d0d0;
}

.load-more-btn:disabled {
  background-color: #f5f5f5;
  color: #ccc;
  cursor: not-allowed;
}

/* 加载状态 */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #07c160;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 性能优化相关样式 */
.product-card,
.hospital-card,
.doctor-card {
  will-change: transform;
  transform: translateZ(0);
}

/* 滚动优化 */
.content-area {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* 图片优化 */
.product-image,
.doctor-avatar,
.hospital-logo {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* 顶部搜索栏 */
.header {
  background: #00AF82;
  padding: 20rpx 30rpx 20rpx 30rpx;
  color: white;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20rpx;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10rpx;
}

.menu-icon {
  font-size: 40rpx;
  font-weight: bold;
  color: white;
}

.category {
  font-size: 28rpx;
  background: rgba(255, 255, 255, 0.2);
  padding: 8rpx 16rpx;
  border-radius: 20rpx;
  color: white;
  font-weight: 500;
}

.search-box {
  flex: 1;
  margin: 0 20rpx;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 25rpx;
  padding: 15rpx 25rpx;
  text-align: center;
  box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.1);
}

.search-placeholder {
  color: #666;
  font-size: 28rpx;
}

.message-icon {
  font-size: 36rpx;
  color: white;
}

.app-title {
  text-align: center;
  font-size: 36rpx;
  font-weight: bold;
  letter-spacing: 2rpx;
  color: white;
}

/* 轮播图 */
.banner-section {
  background: white;
  margin: 20rpx;
  border-radius: 16rpx;
  overflow: hidden;
  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
  border: 1rpx solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10rpx);
  position: relative;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 175, 130, 0.02) 0%, rgba(0, 212, 170, 0.02) 100%);
    pointer-events: none;
    z-index: 1;
  }
}

.banner-swiper {
  height: 300rpx;
}

.banner-item {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-image {
  width: 100%;
  height: 100%;
}

.banner-content {
  position: absolute;
  top: 20rpx;
  left: 20rpx;
  color: white;
  z-index: 2;
}

.banner-tag {
  display: inline-block;
  background: #ff4757;
  color: white;
  font-size: 20rpx;
  padding: 4rpx 12rpx;
  border-radius: 12rpx;
  margin-bottom: 10rpx;
  font-weight: bold;
}

.banner-title {
  display: block;
  font-size: 32rpx;
  font-weight: bold;
  margin-bottom: 8rpx;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
  display: block;
  font-size: 28rpx;
  margin-bottom: 8rpx;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
}

.banner-offer {
  display: block;
  font-size: 24rpx;
  opacity: 0.9;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
}

/* 移除点击下划线 */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 功能按钮区域 - 头部样式 */
.feature-buttons-header {
  background: transparent;
  margin: 10rpx 0 0 0;
  padding: 10rpx 20rpx;
  display: flex;
  justify-content: space-between;
  gap: 10rpx;
}

.feature-btn-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6rpx;
  padding: 8rpx;
  border-radius: 12rpx;
  background: transparent;
  color: white;
  flex: 1;
  min-width: 0;
  transition: all 0.3s ease;
}

.feature-btn-header:active {
  transform: scale(0.95);
}

.feature-icon-header {
  font-size: 36rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50rpx;
  height: 50rpx;
}

/* 新氧魔镜图标样式 */
.magic-mirror-icon {
  position: relative;
  width: 40rpx;
  height: 40rpx;
}

.face-outline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24rpx;
  height: 24rpx;
}

.eye {
  position: absolute;
  width: 2rpx;
  height: 2rpx;
  background: white;
  border-radius: 50%;
}

.eye.left {
  top: 6rpx;
  left: 6rpx;
}

.eye.right {
  top: 6rpx;
  right: 6rpx;
}

.nose {
  position: absolute;
  top: 10rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 1rpx;
  height: 2rpx;
  background: white;
}

.mouth {
  position: absolute;
  bottom: 4rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 8rpx;
  height: 2rpx;
  border: 1rpx solid white;
  border-top: none;
  border-radius: 0 0 4rpx 4rpx;
}

.corner-bracket {
  position: absolute;
  width: 6rpx;
  height: 6rpx;
  border: 1rpx solid white;
}

.corner-bracket.top-left {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.corner-bracket.top-right {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}

.corner-bracket.bottom-left {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}

.corner-bracket.bottom-right {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

/* AI查询图标样式 */
.ai-query-icon {
  position: relative;
  width: 40rpx;
  height: 40rpx;
}

.robot-head {
  position: relative;
  width: 32rpx;
  height: 32rpx;
  border: 2rpx solid white;
  border-radius: 6rpx;
  margin: 0 auto;
  background: transparent;
}

.robot-face {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20rpx;
  height: 16rpx;
  border: 1rpx solid white;
  border-radius: 4rpx;
  background: transparent;
}

.robot-eye {
  position: absolute;
  width: 2rpx;
  height: 2rpx;
  background: white;
  border-radius: 50%;
  top: 4rpx;
}

.robot-eye.left {
  left: 4rpx;
}

.robot-eye.right {
  right: 4rpx;
}

.robot-mouth {
  position: absolute;
  bottom: 2rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 6rpx;
  height: 1rpx;
  background: white;
}

.robot-antenna {
  position: absolute;
  width: 1rpx;
  height: 6rpx;
  background: white;
  top: -4rpx;
}

.robot-antenna.left {
  left: 6rpx;
}

.robot-antenna.right {
  right: 6rpx;
}

.feature-text-header {
  font-size: 20rpx;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* 美丽分析图标样式 - 完全复制新氧魔镜的风格 */
.beauty-analysis-icon {
  position: relative;
  width: 40rpx;
  height: 40rpx;
}

.beauty-face-outline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24rpx;
  height: 24rpx;
}

.beauty-eye {
  position: absolute;
  width: 2rpx;
  height: 2rpx;
  background: white;
  border-radius: 50%;
}

.beauty-eye.left {
  top: 6rpx;
  left: 6rpx;
}

.beauty-eye.right {
  top: 6rpx;
  right: 6rpx;
}

.beauty-nose {
  position: absolute;
  top: 10rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 1rpx;
  height: 2rpx;
  background: white;
}

.beauty-mouth {
  position: absolute;
  bottom: 4rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 8rpx;
  height: 2rpx;
  border: 1rpx solid white;
  border-top: none;
  border-radius: 0 0 4rpx 4rpx;
}

.beauty-corner-bracket {
  position: absolute;
  width: 6rpx;
  height: 6rpx;
  border: 1rpx solid white;
}

.beauty-corner-bracket.top-left {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.beauty-corner-bracket.top-right {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}

.beauty-corner-bracket.bottom-left {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}

.beauty-corner-bracket.bottom-right {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

.beauty-score {
  position: absolute;
  top: -4rpx;
  right: -4rpx;
  width: 8rpx;
  height: 8rpx;
  background: #ff6b6b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rpx;
  color: white;
  font-weight: bold;
}

/* 在线咨询图标样式 - 完全复制新氧魔镜的风格 */
.consultation-icon {
  position: relative;
  width: 40rpx;
  height: 40rpx;
}

.consultation-face-outline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24rpx;
  height: 24rpx;
}

.consultation-eye {
  position: absolute;
  width: 2rpx;
  height: 2rpx;
  background: white;
  border-radius: 50%;
}

.consultation-eye.left {
  top: 6rpx;
  left: 6rpx;
}

.consultation-eye.right {
  top: 6rpx;
  right: 6rpx;
}

.consultation-nose {
  position: absolute;
  top: 10rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 1rpx;
  height: 2rpx;
  background: white;
}

.consultation-mouth {
  position: absolute;
  bottom: 4rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 8rpx;
  height: 2rpx;
  border: 1rpx solid white;
  border-top: none;
  border-radius: 0 0 4rpx 4rpx;
}

.consultation-corner-bracket {
  position: absolute;
  width: 6rpx;
  height: 6rpx;
  border: 1rpx solid white;
}

.consultation-corner-bracket.top-left {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.consultation-corner-bracket.top-right {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}

.consultation-corner-bracket.bottom-left {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}

.consultation-corner-bracket.bottom-right {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

.consultation-badge {
  position: absolute;
  top: -4rpx;
  right: -4rpx;
  width: 8rpx;
  height: 8rpx;
  background: #ff6b6b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rpx;
  color: white;
  font-weight: bold;
}

/* 功能按钮区域 - 原样式（保留备用） */
.feature-buttons {
  background: white;
  margin: 20rpx;
  border-radius: 16rpx;
  padding: 30rpx 20rpx;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-around;
  gap: 20rpx;
}

.feature-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8rpx;
  padding: 20rpx;
  border-radius: 12rpx;
  background: #00AF82;
  color: white;
  min-width: 120rpx;
  transition: all 0.3s ease;
  box-shadow: 0 4rpx 12rpx rgba(0, 175, 130, 0.3);
}

.feature-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2rpx 8rpx rgba(0, 175, 130, 0.4);
}

.feature-icon {
  font-size: 36rpx;
}

.feature-text {
  font-size: 24rpx;
  font-weight: 500;
}

/* 主导航栏 */
.main-nav {
  display: flex;
  background: white;
  padding: 0 30rpx;
  border-bottom: 1rpx solid #f0f0f0;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  margin: 0;
  border-radius: 0;
  position: relative;
  z-index: 2;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    z-index: -1;
  }
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 25rpx 0;
  position: relative;
  font-size: 30rpx;
  color: #666;
  transition: all 0.3s ease;
}

.nav-item.active {
  color: #00AF82;
  font-weight: bold;
}

.nav-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60rpx;
  height: 4rpx;
  background: #00AF82;
  border-radius: 2rpx;
}

/* 筛选标签 */
.filter-tags {
  background: white;
  padding: 24rpx 28rpx;
  white-space: nowrap;
  border-bottom: 1rpx solid #f0f0f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0;
  border-radius: 0;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 1;
}

/* 隐藏所有浏览器的滚动条 */
.filter-tags::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.filter-tags::-webkit-scrollbar-track {
  display: none;
}

.filter-tags::-webkit-scrollbar-thumb {
  display: none;
}

/* 针对微信小程序的额外隐藏 */
.filter-tags {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.filter-tag {
  display: inline-block;
  margin: 0 8rpx;
  padding: 16rpx 24rpx;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 40rpx;
  font-size: 24rpx;
  color: #576b95;
  font-weight: 400;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1rpx solid rgba(0, 175, 130, 0.08);
  outline: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  min-width: 100rpx;
  text-align: center;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
  }
  
  &:active::before {
    left: 100%;
  }
}

.filter-tag.active {
  background: linear-gradient(135deg, #00AF82 0%, #00d4aa 100%);
  color: white;
  font-weight: 500;
  border: 1rpx solid #00AF82;
  box-shadow: 0 4rpx 16rpx rgba(0, 175, 130, 0.25);
  transform: scale(1.02) translateY(-1rpx);
  font-size: 26rpx;
  
  &::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  }
}

/* 商品列表 */
.product-list {
  flex: 1;
  padding: 0;
}

.product-grid {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
  padding: 20rpx;
  margin: 0;
  justify-content: space-between;
  gap: 0;
}

.product-card {
  background: white;
  border-radius: 16rpx;
  overflow: hidden;
  box-shadow: 0 6rpx 24rpx rgba(0, 0, 0, 0.06);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  width: calc(50% - 8rpx);
  height: 460rpx;
  margin-bottom: 20rpx;
  box-sizing: border-box;
  border: 1rpx solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10rpx);
  /* Taro 兼容性优化 */
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
    z-index: 1;
  }
}

.product-card:active {
  transform: scale(0.98) translateY(-4rpx);
  box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.15);
}

/* 微信小程序兼容性优化 */
.product-card {
  /* 确保在微信小程序中正确显示 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6rpx;
  margin: 12rpx 0;
  padding: 0;
  justify-content: flex-start;
}

.product-tag {
  display: inline-block;
  background: #ff6b35;
  color: white;
  font-size: 18rpx;
  padding: 4rpx 8rpx;
  border-radius: 8rpx;
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 1rpx 4rpx rgba(255, 107, 53, 0.3);
}

.product-image-container {
  position: relative;
  width: 100%;
  height: 200rpx;
  background: #f8f9fa;
  overflow: hidden;
  border-radius: 16rpx 16rpx 0 0;
  flex-shrink: 0;
}

.product-card .product-image {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  object-fit: cover;
}

.product-info {
  padding: 18rpx;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 240rpx;
  min-height: 240rpx;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.product-title {
  font-size: 26rpx;
  color: #333;
  line-height: 1.4;
  margin-bottom: 15rpx;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 72rpx;
  font-weight: 500;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10rpx;
  margin-bottom: 15rpx;
  min-height: 40rpx;
}

.current-price {
  font-size: 32rpx;
  color: #ff4757;
  font-weight: bold;
}

.original-price {
  font-size: 24rpx;
  color: #999;
  text-decoration: line-through;
}

.saved-price {
  font-size: 22rpx;
  color: #ff6b35;
  background: #fff5f0;
  padding: 4rpx 8rpx;
  border-radius: 8rpx;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32rpx;
  margin-top: auto;
}

.hospital-name {
  font-size: 24rpx;
  color: #666;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating {
  font-size: 24rpx;
  color: #ffa500;
  font-weight: bold;
}

/* 医院列表样式 */
.hospital-list {
  flex: 1;
  padding: 0;
}

.hospital-grid {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
  padding: 20rpx;
}

.hospital-card {
  background: #ffffff;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.08);
  border: none;
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
  width: 100%;
  
  &:active {
    transform: scale(0.98);
    box-shadow: 0 1rpx 8rpx rgba(0, 0, 0, 0.12);
  }
}

.hospital-header {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
  margin-bottom: 0;
  padding: 28rpx 28rpx 20rpx 28rpx;
  background: linear-gradient(135deg, rgba(0, 175, 130, 0.95) 0%, rgba(0, 212, 170, 0.9) 100%);
  color: white;
  border-radius: 16rpx 16rpx 0 0;
  position: relative;
  backdrop-filter: blur(10rpx);
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16rpx 16rpx 0 0;
    z-index: 1;
  }
  
  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1rpx;
    background: rgba(255, 255, 255, 0.15);
    z-index: 2;
  }
}

.hospital-info {
  display: flex;
  gap: 24rpx;
  flex: 1;
  width: 100%;
  align-items: flex-start;
}

.hospital-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  flex-shrink: 0;
}

.hospital-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #f0f0f0;
}

.hospital-details {
  flex: 1;
}

.hospital-stats {
  display: flex;
  align-items: center;
  gap: 20rpx;
  margin-top: 12rpx;
}

.hospital-stats .rating {
  font-size: 26rpx;
  color: #ffd700;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4rpx;
}

.hospital-stats .services {
  font-size: 24rpx;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  line-height: 1.3;
}

.hospital-name {
  font-size: 28rpx;
  font-weight: 600;
  color: white;
  margin-bottom: 12rpx;
  line-height: 1.3;
  letter-spacing: 0.3rpx;
  position: relative;
  z-index: 3;
}

.hospital-rating {
  display: flex;
  gap: 16rpx;
  margin-bottom: 8rpx;
}

.hospital-rating .rating {
  font-size: 24rpx;
  color: #ffa500;
}

.hospital-rating .services,
.hospital-rating .reviews {
  font-size: 24rpx;
  color: #666;
}

.hospital-meta {
  display: flex;
  gap: 16rpx;
  font-size: 24rpx;
  color: #666;
}

.consult-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 16rpx 24rpx;
  border-radius: 20rpx;
  font-size: 24rpx;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 120rpx;
  text-align: center;
  position: relative;
  z-index: 10;
  border: 1rpx solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10rpx);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  
  &:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.15);
  }
}

// 图片占位符样式
.logo-placeholder,
.avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  border-radius: 50%;
  box-sizing: border-box;
  
  .placeholder-icon {
    font-size: 32rpx;
    margin-bottom: 4rpx;
    opacity: 0.6;
  }
  
  .placeholder-text {
    font-size: 16rpx;
    color: #999;
    text-align: center;
  }
}

.avatar-placeholder {
  .placeholder-icon {
    font-size: 40rpx;
  }
}

.hospital-tag {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #8b4513;
  padding: 16rpx 24rpx;
  border-radius: 0;
  font-size: 24rpx;
  font-weight: 500;
  margin: 24rpx 32rpx 0 32rpx;
  align-self: flex-start;
  box-shadow: 0 2rpx 8rpx rgba(255, 215, 0, 0.2);
  border: 1rpx solid rgba(255, 255, 255, 0.3);
  position: relative;
}

.hospital-products-container {
  margin-top: 24rpx;
  padding: 0 32rpx 32rpx 32rpx;
  overflow: hidden;
}

.hospital-products-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hospital-products-scroll::-webkit-scrollbar {
  display: none;
}

.hospital-products-list {
  display: flex;
  gap: 16rpx;
  padding-bottom: 8rpx;
  width: max-content;
  min-width: 100%;
  flex-wrap: nowrap;
}

.hospital-product-card {
  flex-shrink: 0;
  width: 200rpx;
  min-width: 200rpx;
  background: #ffffff;
  border-radius: 12rpx;
  padding: 20rpx;
  box-sizing: border-box;
  transition: all 0.2s ease;
  border: 1rpx solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  position: relative;
}

.hospital-product-card .product-image-container {
  position: relative;
  width: 100%;
  height: 120rpx;
  border-radius: 8rpx;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 16rpx;
}

.hospital-product-card:active {
  transform: scale(0.95);
  box-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.08);
}

.hospital-product-card .product-image {
  width: 100%;
  height: 100%;
  border-radius: 8rpx;
  object-fit: cover;
  background: #f5f5f5;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.hospital-product-card .product-title {
  font-size: 24rpx;
  color: #191f28;
  margin-bottom: 16rpx;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  height: 48rpx;
  font-weight: 500;
}

.hospital-product-card .product-price {
  display: flex;
  flex-direction: column;
  gap: 4rpx;
}

.hospital-product-card .current-price {
  font-size: 28rpx;
  color: #fa5151;
  font-weight: 600;
  margin-bottom: 8rpx;
}

.hospital-product-card .saved-price {
  font-size: 20rpx;
  color: #07c160;
  font-weight: 400;
  background: rgba(7, 193, 96, 0.08);
  padding: 6rpx 12rpx;
  border-radius: 12rpx;
  align-self: flex-start;
  border: 1rpx solid rgba(7, 193, 96, 0.15);
}

// 产品标签样式
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8rpx;
  margin-bottom: 12rpx;
}

.product-tag {
  font-size: 20rpx;
  color: #576b95;
  background: rgba(87, 107, 149, 0.08);
  padding: 4rpx 8rpx;
  border-radius: 8rpx;
  border: 1rpx solid rgba(87, 107, 149, 0.15);
  font-weight: 400;
}

/* 响应式设计 - 小屏幕时调整卡片宽度 */
@media (max-width: 750rpx) {
  .hospital-product-card {
    width: 180rpx;
  }
  
  .hospital-product-card .product-image {
    height: 100rpx;
  }
  
  .hospital-product-card .product-title {
    font-size: 20rpx;
    height: 40rpx;
  }
  
  .hospital-product-card .current-price {
    font-size: 22rpx;
  }
  
  .hospital-product-card .saved-price {
    font-size: 18rpx;
  }
}

/* 医生列表样式 */
.doctor-list {
  flex: 1;
  padding: 0;
}

.doctor-grid {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
  padding: 20rpx;
}

.doctor-card {
  background: #ffffff;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.08);
  border: none;
  transition: all 0.2s ease;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  
  &:active {
    transform: scale(0.98);
    box-shadow: 0 1rpx 8rpx rgba(0, 0, 0, 0.12);
  }
}

.doctor-header {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 28rpx 28rpx 20rpx 28rpx;
  background: linear-gradient(135deg, rgba(0, 175, 130, 0.95) 0%, rgba(0, 212, 170, 0.9) 100%);
  color: white;
  border-radius: 16rpx 16rpx 0 0;
  position: relative;
  backdrop-filter: blur(10rpx);
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16rpx 16rpx 0 0;
    z-index: 1;
  }
  
  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1rpx;
    background: rgba(255, 255, 255, 0.15);
    z-index: 2;
  }
}

.doctor-info {
  display: flex;
  gap: 16rpx;
  flex: 1;
  width: 100%;
}

.doctor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  flex-shrink: 0;
}

.doctor-avatar {
  width: 100rpx;
  height: 100rpx;
  border-radius: 50%;
  background: #f0f0f0;
}

.doctor-details {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.doctor-name {
  font-size: 28rpx;
  font-weight: 600;
  color: white;
  margin-bottom: 8rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.3;
  position: relative;
  z-index: 3;
}

.doctor-specialties {
  display: flex;
  gap: 8rpx;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: hidden;
}

.specialty-tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6rpx 12rpx;
  border-radius: 16rpx;
  font-size: 20rpx;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  border: 1rpx solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5rpx);
  position: relative;
  z-index: 3;
}

.doctor-tag {
  background: #fff3cd;
  color: #856404;
  padding: 8rpx 16rpx;
  border-radius: 12rpx;
  font-size: 22rpx;
  margin-bottom: 16rpx;
  align-self: flex-start;
  margin-left: 20rpx;
  margin-right: 20rpx;
}

.doctor-products-container {
  margin-top: 16rpx;
  padding: 0 20rpx 20rpx 20rpx;
  overflow: hidden;
}

.doctor-products-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* 隐藏医生产品列表的滚动条 */
.doctor-products-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.doctor-products-scroll::-webkit-scrollbar-track {
  display: none;
}

.doctor-products-scroll::-webkit-scrollbar-thumb {
  display: none;
}

/* 针对微信小程序的额外隐藏 */
.doctor-products-scroll {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.doctor-products-list {
  display: flex;
  gap: 16rpx;
  padding-bottom: 8rpx;
  width: max-content;
  min-width: 100%;
  flex-wrap: nowrap;
}

.doctor-product-card {
  flex-shrink: 0;
  width: 200rpx;
  min-width: 200rpx;
  background: #f8f9fa;
  border-radius: 12rpx;
  padding: 12rpx;
  box-sizing: border-box;
  transition: transform 0.2s ease;
  border: 1rpx solid #e0e0e0;
}

.doctor-product-card:hover {
  transform: translateY(-2rpx);
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}

.doctor-product-card .product-image {
  width: 100%;
  height: 120rpx;
  border-radius: 8rpx;
  margin-bottom: 8rpx;
}

.doctor-product-card .product-title {
  font-size: 22rpx;
  color: #333;
  margin-bottom: 8rpx;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  height: 44rpx; /* 固定高度，确保2行文字 */
}

.doctor-product-card .product-price {
  display: flex;
  flex-direction: column;
  gap: 4rpx;
}

.doctor-product-card .current-price {
  font-size: 24rpx;
  color: #ff4757;
  font-weight: bold;
}

.doctor-product-card .saved-price {
  font-size: 20rpx;
  color: #666;
}

/* 医生产品响应式设计 - 小屏幕时调整卡片宽度 */
@media (max-width: 750rpx) {
  .doctor-product-card {
    width: 180rpx;
  }
  
  .doctor-product-card .product-image {
    height: 100rpx;
  }
  
  .doctor-product-card .product-title {
    font-size: 20rpx;
    height: 40rpx;
  }
  
  .doctor-product-card .current-price {
    font-size: 22rpx;
  }
  
  .doctor-product-card .saved-price {
    font-size: 18rpx;
  }
}

/* 响应式设计 */
@media (max-width: 320px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .product-title {
    font-size: 24rpx;
  }
  
  .current-price {
    font-size: 28rpx;
  }
}

/* 小屏幕优化 */
@media (max-width: 360px) {
  .product-card {
    padding: 16rpx;
  }
  
  .product-title {
    font-size: 26rpx;
  }
  
  .current-price {
    font-size: 30rpx;
  }
}

/* 调试样式已移除 - 布局问题已修复 */

/* 确保在小屏幕上也能看到两列布局 */
@media (max-width: 375px) and (min-width: 321px) {
  .product-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10rpx;
  }
  
  .product-card {
    padding: 12rpx;
  }
  
  .product-title {
    font-size: 22rpx;
  }
  
  .current-price {
    font-size: 26rpx;
  }
}

/* 虚拟滚动样式 */
.virtual-scroll-container {
  position: relative;
  overflow: hidden;
  
  .virtual-scroll-view {
    height: 100%;
    
    .virtual-scroll-content {
      position: relative;
      width: 100%;
    }
  }
}

.virtual-scroll-item {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.product-virtual-list,
.hospital-virtual-list,
.doctor-virtual-list {
  .virtual-scroll-content {
    display: flex;
    flex-direction: column;
  }
  
  .virtual-scroll-item {
    margin-bottom: 10px;
  }
}

.empty-virtual-list {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-size: 14px;
}

/* 图片加载动画 */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 性能优化样式 */
.product-card,
.hospital-card,
.doctor-card {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  
  .product-image,
  .hospital-logo,
  .doctor-avatar {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* 加载状态指示器 */
.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #666;
  font-size: 14px;
  
  &::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
  }
}

/* 加载容器 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400rpx;
  color: #666;
  font-size: 28rpx;
  
  .loading-spinner {
    width: 60rpx;
    height: 60rpx;
    border: 6rpx solid #f3f3f3;
    border-top: 6rpx solid #00AF82;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20rpx;
  }
}

/* 下拉刷新指示器 */
.refresh-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20rpx;
  background: #f8f9fa;
  border-bottom: 1rpx solid #e9ecef;
  
  .refresh-spinner {
    width: 40rpx;
    height: 40rpx;
    border: 4rpx solid #f3f3f3;
    border-top: 4rpx solid #00AF82;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15rpx;
  }
  
  text {
    font-size: 26rpx;
    color: #666;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误状态样式 */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
  
  .error-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #ccc;
  }
  
  .retry-btn {
    margin-top: 15px;
    padding: 8px 16px;
    background: #007aff;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    
    &:active {
      background: #0056cc;
    }
  }
}



/* 搜索状态提示 */
.search-status {
  background: white;
  padding: 24rpx 30rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1rpx solid #f0f0f0;
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
  margin: 0 20rpx;
  border-radius: 16rpx 16rpx 0 0;
  position: relative;
  z-index: 2;

  .search-status-text {
    font-size: 28rpx;
    color: #333;
    font-weight: 500;
  }

  .search-clear-btn {
    font-size: 26rpx;
    color: #00AF82;
    padding: 12rpx 20rpx;
    border-radius: 20rpx;
    background: linear-gradient(135deg, #f0f9f6 0%, #e8f5f0 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1rpx solid rgba(0, 175, 130, 0.2);
    font-weight: 500;

    &:active {
      background: linear-gradient(135deg, #e0f2e9 0%, #d4ede4 100%);
      transform: scale(0.95);
      box-shadow: 0 2rpx 8rpx rgba(0, 175, 130, 0.2);
    }
  }
}

/* 搜索建议样式 */
.search-suggestions {
  background: white;
  border-radius: 24rpx;
  margin: 10rpx 20rpx 0 20rpx;
  box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.12);
  max-height: 600rpx;
  overflow-y: auto;
  z-index: 1000;
  border: 1rpx solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10rpx);
  position: relative;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    border-radius: 24rpx;
    z-index: -1;
  }

  .suggestions-list {
    .suggestion-item {
      padding: 20rpx 30rpx;
      border-bottom: 1rpx solid #f5f5f5;
      cursor: pointer;
      transition: background-color 0.2s ease;

      &:hover {
        background: #f9f9f9;
      }

      &:last-child {
        border-bottom: none;
      }

      .suggestion-text {
        font-size: 28rpx;
        color: #333;
      }
    }
  }

  .hot-search {
    padding: 20rpx 30rpx;

    .hot-search-title {
      font-size: 24rpx;
      color: #999;
      margin-bottom: 15rpx;
      display: block;
    }

    .hot-search-words {
      display: flex;
      flex-wrap: wrap;
      gap: 15rpx;

      .hot-search-word {
        font-size: 24rpx;
        color: #666;
        background: #f5f5f5;
        padding: 8rpx 16rpx;
        border-radius: 15rpx;
        cursor: pointer;
        transition: all 0.2s ease;

        &:hover {
          background: #e0e0e0;
        }

        &:active {
          transform: scale(0.95);
        }
      }
    }
  }
}

/* 搜索输入框样式 */
.search-input {
  flex: 1;
  height: 50rpx;
  font-size: 28rpx;
  color: #333;
  border: none;
  outline: none;
  background: transparent;

  &::placeholder {
    color: #999;
  }
}

.search-clear {
  font-size: 32rpx;
  color: #999;
  padding: 10rpx;
  cursor: pointer;
  transition: color 0.2s ease;

  &:hover {
    color: #666;
  }
}



// 代码分割加载状态
.code-splitting-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40rpx;
  
  .loading-spinner {
    width: 40rpx;
    height: 40rpx;
    border: 4rpx solid #f3f3f3;
    border-top: 4rpx solid #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  .loading-text {
    margin-left: 20rpx;
    color: #666;
    font-size: 28rpx;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

// 持久化缓存状态指示器
.cache-status {
  position: fixed;
  top: 100rpx;
  right: 20rpx;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 12rpx 16rpx;
  border-radius: 8rpx;
  font-size: 20rpx;
  z-index: 1000;
  
  &.ready {
    background: rgba(76, 175, 80, 0.8);
  }
  
  &.loading {
    background: rgba(255, 152, 0, 0.8);
  }
  
  &.error {
    background: rgba(244, 67, 54, 0.8);
  }
}

// 响应式优化
@media (max-width: 750rpx) {
  
  .cache-status {
    top: 80rpx;
    right: 16rpx;
    padding: 8rpx 12rpx;
    font-size: 18rpx;
  }
}
